client

	proc
		// Save the users preferences
		SaveMe()
			var/savefile/F = new("[People][ckey].sav")

			// Chat preferences
			F["[src]/Colors"] = src.Colors
			F["[src]/WhoSide"] = src.WhoSide
			F["[src]/Output"] = src.Output_Style
			F["[src]/Name"] = src.Name_Color
			F["[src]/Text"] = src.Text_Color
			F["[src]/HourOffset"] = src.HOUR_Offset
			F["[src]/MinuteOffset"] = src.MIN_Offset
			F["[src]/SecondOffset"] = src.SEC_Offset
			F["[src]/MaxLines"] = src.Max_Lines
			F["[src]/IgnoreList"] = src.Ignored
			F["[src]/IM_ENABLE"] = src.IM_ENABLE

			//Profile
			F["[src]/User_Name"] = src.User_Name
			F["[src]/User_Gender"] = src.User_Gender
			F["[src]/User_Age"] = src.User_Age
			F["[src]/User_Image"] = src.User_Image
			F["[src]/User_Location"] = src.User_Location
			F["[src]/User_Contact"] = src.User_Contact
			F["[src]/User_Messenger"] = src.User_Messenger
			F["[src]/First_Login"] = src.First_Login

			SaveCasino()


		// Load the users preferences
		LoadMe()
			var/savefile/F = new("[People][ckey].sav")
			src.First_Login = F["[src]/First_Login"]
			if(src.First_Login == null) src.First_Login = 1

			if(!src.First_Login)
				// Chat preferences
				src.Colors = F["[src]/Colors"]
				src.WhoSide = F["[src]/WhoSide"]
				src.Output_Style = F["[src]/Output"]
				src.Name_Color = F["[src]/Name"]
				src.Text_Color = F["[src]/Text"]
				src.HOUR_Offset = F["[src]/HourOffset"]
				src.MIN_Offset = F["[src]/MinuteOffset"]
				src.SEC_Offset = F["[src]/SecondOffset"]
				src.Max_Lines = F["[src]/MaxLines"]
				src.Ignored = F["[src]/IgnoreList"]
				if(src.Ignored == null) src.Ignored = list()
				src.IM_ENABLE = F["[src]/IM_ENABLE"]

				// Profile
				src.User_Name = F["[src]/User_Name"]
				src.User_Gender = F["[src]/User_Gender"]
				src.User_Age = F["[src]/User_Age"]
				src.User_Image = F["[src]/User_Image"]

				if(src.User_Image == "")
					src.User_Image = getImage(src.ckey)

				src.User_Location = F["[src]/User_Location"]
				src.User_Contact = F["[src]/User_Contact"]
				src.User_Messenger = F["[src]/User_Messenger"]
				src.First_Login = F["[src]/First_Login"]





		SaveCasino()
			var/ID = ReturnKeyID(src.key)
			var/savefile/Person = new("[People][ckey].sav")
			if(ID != 0)
				Person["[src]/Credits"] = src.Credits
				Person["[src]/TotalSpins"] = src.TotalSpins
				Person["[src]/TotalWager"] = src.TotalWager
				Person["[src]/TotalWon"] = src.TotalWon

		LoadCasino()
			var/ID = ReturnKeyID(src.key)
			var/savefile/Person = new("[People][ckey].sav")
			if(ID != 0)
				for(var/client/C in Everyone)
					if(C.key in Person["[ID]/Keys"])
						var/client/person = findTarget(C.key)
						person.Credits = Person["[src]/Credits"]
						person.TotalSpins = Person["[src]/TotalSpins"]
						person.TotalWager = Person["[src]/TotalWager"]
						person.TotalWon = Person["[src]/TotalWon"]
			else
				src.Credits = 0